home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************************/
- /* */
- /* Program Name: Stiletto */
- /* */
- /* File Name: CallBackRoutines.c */
- /* */
- /* © Apple Computer, Inc. 1991-1995 */
- /* All Rights Reserved */
- /* */
- /* Revision History: */
- /* */
- /* Date Who Modification */
- /* */
- /* 1991-09-28 Chris Halim Original version */
- /* 1995-06-26 Jaakko Railo Version 2.0 */
- /* */
- /************************************************************************************************/
-
- /****************************************** DESCRIPTION ******************************************
-
- *************************************************************************************************/
-
- /******************************************** HEADERS *******************************************/
-
- #ifndef __STDARG__
- #include "stdarg.h"
- #endif
-
- #ifndef __TELEPHONES__
- #include "Telephones.h"
- #endif
-
- #ifndef __CALLBACKROUTINES__
- #include "CallBackRoutines.h"
- #endif
-
- #ifndef __CHRSMODULES__
- #include "CHRSModules.h"
- #endif
-
- #ifndef __LOGWINDOW__
- #include "LogWindow.h"
- #endif
-
- #ifndef __TERMWINDOW__
- #include "TermWindow.h"
- #endif
-
- /****************************************** DEFINITIONS *****************************************/
-
- /****************************************** PROTOTYPES ******************************************/
-
- TELHandle GetCurrentTELHandleStub ();
- TELCAHandle GetCAHandleStub ();
- TELDNHandle GetDNHandleStub ();
- void PrintStub (CHRSPtr paramPtr, const char * format, va_list ap);
-
- /******************************************** GLOBALS *******************************************/
-
- extern TelWindowPtr gTelWindow;
-
- extern LogWindowPtr gLogWindow;
-
- /************************************************************************************************/
- /************************************************************************************************/
-
-
- void EntryPoint (CHRSPtr paramPtr)
- {
- short resultCode = requestSuccess;
-
- switch (paramPtr->request)
- {
- case getCurrentTELHandleRequest :
- paramPtr->outArgs[0] = (long) GetCurrentTELHandleStub ();
- break;
-
- case getCAHandleRequest :
- paramPtr->outArgs[0] = (long) GetCAHandleStub ();
- break;
-
- case getDNHandleRequest :
- paramPtr->outArgs[0] = (long) GetDNHandleStub ();
- break;
-
- case printRequest :
- PrintStub (paramPtr, (char *) paramPtr->inArgs[0], (va_list) paramPtr->inArgs[1]);
- break;
-
- default :
- resultCode = requestNotImplemented;
- }
-
- paramPtr->result = resultCode;
- }
-
-
- TELHandle GetCurrentTELHandleStub ()
- {
- return (gTelWindow->fTELHandle);
- }
-
-
- TELCAHandle GetCAHandleStub ()
- {
- return (GetAnyCA (gTelWindow));
- }
-
- TELDNHandle GetDNHandleStub ()
- {
- return (GetAnyDN (gTelWindow));
- }
-
- void PrintStub (CHRSPtr paramPtr, const char * format, va_list ap)
- {
- VPutLine (gLogWindow, format, ap);
-
- paramPtr->result = requestSuccess;
- }